/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include "../PBD核心.h"
#include <材质/资产.h>




struct S_外力数据 {
	S_板载缓存* m_方向力;

	S_外力数据(S_设备环境& ctx);

	void f_resize(uint64 count, uint8 邻接最大数量);
};



struct S_vk邻接数据 {
	S_板载缓存* m_排序索引桶A;
	S_板载缓存* m_排序索引桶B;
	S_板载缓存* m_排序桶元素数量;
	S_板载缓存* m_排序桶元素偏移;
	
	S_板载缓存* m_合并元素参数;
	S_板载缓存* m_索引体素;
	
	S_vk邻接数据(S_设备环境& ctx);
	
	void f_resize(uint64 count, uint16 分段数);

};




typedef struct {
	float32	m_步进时间;
	float32 m_单元大小;
}S_PBF计算属性;


struct S_坐标数据 {
	S_板载缓存* m_坐标;
	S_板载缓存* m_速度;
	//S_板载缓存* m_外力;
	S_板载缓存* m_块量;
	S_板载缓存* m_邻接;

	S_板载缓存* m_坐标_Old;
	S_板载缓存* m_坐标_上一次最终;

	S_板载缓存* m_属性;


	//S_坐标数据(S_设备环境& ctx);
	S_外力数据* m_外力数据;
	S_vk邻接数据* m_坐标邻接;
	
	S_坐标数据(S_设备环境& ctx);
	
	void f_resize(uint64 count, uint8 邻接最大数量);
	void f_set属性(const S_PBF计算属性& data);

};






